package com.work.vo.main;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.work.constant.DictBizConstant;
import com.work.utils.BigDecimalSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictBizCache;

import java.math.BigDecimal;

/**
 * 出口船统计舱单信息VO
 *
 * @author ：dujianyu
 * @since ：Created in 2024/6/26 13:11
 */
@Data
public class ExpShipBillStatVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "ID",notes = "")
    private Long id ;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "tsbId",notes = "")
    private Long tsbId ;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "货运船ID",notes = "")
    private Long transportShipId ;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "货运舱单ID",notes = "")
    private Long transportBillId ;

    @ApiModelProperty(name = "单号",notes = "")
    private String billNo ;

    @ApiModelProperty(name = "进出口",notes = "")
    private String iE ;

    @ApiModelProperty(name = "包装",notes = "")
    private String billPackageType ;

    @ApiModelProperty(name = "包装",notes = "")
    private String billPackageTypeName ;

    @ApiModelProperty(name = "货主",notes = "")
    private String cargoOwnerName ;

    @ApiModelProperty(name = "货名",notes = "")
    private String cargoTypeName ;

    @ApiModelProperty(name = "下货纸",notes = "")
    private String shippingOrderStatus ;

    @ApiModelProperty(name = "下货纸",notes = "")
    private String shippingOrderStatusName ;

    public String getShippingOrderStatusName() {
        if (Func.isNull(shippingOrderStatus)) {
            return "";
        }
        return DictBizCache.getValue(DictBizConstant.SHIPPING_ORDER_STATUS, shippingOrderStatus);
    }

    @ApiModelProperty(name = "放行",notes = "")
    private String isPass ;

    @ApiModelProperty(name = "是否完结",notes = "")
    private String isExpFinish ;

    @ApiModelProperty(name = "是否完结",notes = "")
    private String isImpFinish;

    @ApiModelProperty(name = "装清",notes = "")
    private String isLoadClear ;

    @ApiModelProperty(name = "收齐",notes = "")
    private String isReceiveClear ;

    @ApiModelProperty(name = "计划件",notes = "")
    private Integer planPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "计划吨",notes = "")
    private BigDecimal planTon ;

    @ApiModelProperty(name = "计划件吨信息",notes = "")
    private String planPieceTonInfo;

    public String getPlanPieceTonInfo() {
        if (Func.isNull(planPiece) || Func.isNull(planTon)) {
            return "";
        }
        return planPiece + "/" + planTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "总件数",notes = "")
    private Integer allPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "总吨数",notes = "")
    private BigDecimal allTon ;

    @ApiModelProperty(name = "总件吨信息",notes = "")
    private String allPieceTonInfo;

    public String getAllPieceTonInfo() {
        if (Func.isNull(allPiece) || Func.isNull(allTon)) {
            return "";
        }
        return allPiece + "/" + allTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "入库件数",notes = "")
    private Integer inPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "入库吨数",notes = "")
    private BigDecimal inTon ;

    @ApiModelProperty(name = "入库信息",notes = "")
    private String inPieceTonInfo;

    public String getInPieceTonInfo() {
        if (Func.isNull(inPiece) || Func.isNull(inTon)) {
            return "";
        }
        return inPiece + "/" + inTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "出库件数",notes = "")
    private Integer outPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "出库吨数",notes = "")
    private BigDecimal outTon ;

    @ApiModelProperty(name = "出库信息",notes = "")
    private String outPieceTonInfo;

    public String getOutPieceTonInfo() {
        if (Func.isNull(outPiece) || Func.isNull(outTon)) {
            return "";
        }
        return outPiece + "/" + outTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "转入件数",notes = "")
    private Integer transferInPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "转入吨数",notes = "")
    private BigDecimal transferInTon ;

    @ApiModelProperty(name = "转入信息",notes = "")
    private String transferInPieceTonInfo;

    public String getTransferInPieceTonInfo() {
        if (Func.isNull(transferInPiece) || Func.isNull(transferInTon)) {
            return "";
        }
        return transferInPiece + "/" + transferInTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "转出件数",notes = "")
    private Integer transferOutPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "转出吨数",notes = "")
    private BigDecimal transferOutTon ;

    @ApiModelProperty(name = "转出信息",notes = "")
    private String transferOutPieceTonInfo;

    public String getTransferOutPieceTonInfo() {
        if (Func.isNull(transferOutPiece) || Func.isNull(transferOutTon)) {
            return "";
        }
        return transferOutPiece + "/" + transferOutTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "地装件数",notes = "")
    private Integer landLoadPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "地装吨数",notes = "")
    private BigDecimal landLoadTon ;

    @ApiModelProperty(name = "地装信息",notes = "")
    private String landLoadPieceTonInfo;

    public String getLandLoadPieceTonInfo() {
        if (Func.isNull(landLoadPiece) || Func.isNull(landLoadTon)) {
            return "";
        }
        return landLoadPiece + "/" + landLoadTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "船放件数",notes = "")
    private Integer shipLoadPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "船放吨数",notes = "")
    private BigDecimal shipLoadTon ;

    @ApiModelProperty(name = "船放信息",notes = "")
    private String shipLoadPieceTonInfo;

    public String getShipLoadPieceTonInfo() {
        if (Func.isNull(shipLoadPiece) || Func.isNull(shipLoadTon)) {
            return "";
        }
        return shipLoadPiece + "/" + shipLoadTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "库存件数",notes = "")
    private Integer storagePiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "库存吨数",notes = "")
    private BigDecimal storageTon ;

    @ApiModelProperty(name = "库存信息",notes = "")
    private String storagePieceTonInfo;

    public String getStoragePieceTonInfo() {
        if (Func.isNull(storagePiece) || Func.isNull(storageTon)) {
            return "";
        }
        return storagePiece + "/" + storageTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "退关设置件数",notes = "")
    private Integer retreatPiece ;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(name = "退关设置吨数",notes = "")
    private BigDecimal retreatTon ;

    @ApiModelProperty(name = "退关设置信息",notes = "")
    private String retreatPieceTonInfo;

    public String getRetreatPieceTonInfo() {
        if (Func.isNull(retreatPiece) || Func.isNull(retreatTon)) {
            return "";
        }
        return retreatPiece + "/" + retreatTon.stripTrailingZeros().toPlainString();
    }

    @ApiModelProperty(name = "全部货位",notes = "")
    private String positions ;
}
